package com.gaff.emp.core.modules.perm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Data;

import java.util.List;

@Data
@TableName("sys_menu")
public class SysMenu {

    public static final Integer catalog = 0;
    public static final Integer menu = 1;

    public static final Integer show = 0;
    public static final Integer hidden = 1;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer parentId;

    private String name;

    private String code;

    private String url;

    private String perm;

    /**
     * 类型 0：目录  1：菜单
     */
    private Integer type;

    private Integer isHidden;

    private String icon;

    private Integer sort;

    @TableField(exist = false)
    private List<SysMenu> subMenus;

    @TableField(exist = false)
    private String parentName;

}
